# @Time    :2025/3/21 15:21
# 自动类型转换
num11 = 20
num22 = 1.0
print(num11 + num22)
num1 = 9
num2 = 1
print(num1 / num2)
# str和int无法隐式转换
# num3=30
# num4="456"
# print(num3+num4) #报错

# 将一个字符串转换成ASCII整数值
print(ord("b"))

# chr(x)整数转换成Unicode字符
print(chr(98))

# int
print(int(12))
print(float(12))
print(str(12))
print(repr(12))

num_str = "123"
print(type(num_str))
print(int(num_str))
print(float(num_str))
print(repr(num_str))  # 显示出类型
num7 = 12
print(str(num7))


